package com.runda.partypolicy.app.repository;

import com.blankj.utilcode.util.CacheDiskUtils;
import com.google.gson.Gson;
import com.runda.partypolicy.app.repository.api.APIServiceCreator;
import com.runda.partypolicy.app.repository.db.LocalDB;

import javax.inject.Inject;

/**
 * author:  RD_CY
 * date:    2018/9/4
 * version: v1.0
 * description: 通用仓库
 */
public class Repository_Common {

    private Gson gson;
    private LocalDB localDB;
    private CacheDiskUtils cacheUtil;
    private APIServiceCreator api;

    @Inject
    public Repository_Common(
            Gson gson, LocalDB localDB,
            CacheDiskUtils cacheUtil, APIServiceCreator api) {
        this.api = api;
        this.gson = gson;
        this.localDB = localDB;
        this.cacheUtil = cacheUtil;
    }

    /**
     * 获取首页数据
     */
//    public Flowable<RepositoryResult<MainPageData>> getMainPageData() {
//        return api.getRequester().getMainPageData("meaningless");
//    }
}
